package com.umgsai.thread.thread64;

public class Service {
	static public void serviceMethod(Object object){
		try {
			synchronized (object) {
				System.out.println(Thread.currentThread().getName() + "进入了serviceMethod方法");
				Thread.sleep(1000);
				object.wait();
				System.out.println(Thread.currentThread().getName() + "离开了serviceMethod方法");
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
